﻿using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Master;

namespace Thaire.Investment.Repository.Mapping
{
    class CounterpartyLimitMap : ClassMap<CounterpartyLimit>
    {
        public CounterpartyLimitMap()
        {
            Table("COUNTERPARTY_LIMIT");
            Id(x => x.CounterpartyLimitId, "COUNTERPARTY_LIMIT_ID").GeneratedBy.Identity();
            Map(x => x.AssetClassId, "ASSET_CLASS_ID");
            Map(x => x.CounterpartyLimitGovPercent, "COUNTERPARTY_LIMIT_GOV_PERCENT");
            Map(x => x.CounterpartyLimitFiPercent, "COUNTERPARTY_LIMIT_FI_PERCENT");
            Map(x => x.CounterpartyLimitSePercent, "COUNTERPARTY_LIMIT_SE_PERCENT");
            Map(x => x.CounterpartyLimitIgPercent, "COUNTERPARTY_LIMIT_IG_PERCENT");
            Map(x => x.CounterpartyLimitListedPercent, "COUNTERPARTY_LIMIT_LISTED_PERCENT");
            Map(x => x.CounterpartyLimitOtherPercent, "COUNTERPARTY_LIMIT_OTHER_PERCENT");
            Map(x => x.CounterpartyLimitStartDate, "COUNTERPARTY_LIMIT_START_DATE");
            Map(x => x.CounterpartyLimitExpireDate, "COUNTERPARTY_LIMIT_EXPIRE_DATE");
        }
    }
}
